package com.xx.sg.own.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("sg_camera")
public class Camera {

    @TableId(value = "id")
    private String id;

    @TableField(value = "index_code")
    private String indexCode;

    @TableField("region_index_code")
    private String regionIndexCode;

    @TableField("external_index_code")
    private String externalIndexCode;

    @TableField("name")
    private String name;

    @TableField("parent_index_code")
    private String parentIndexCode;

    @TableField("longitude")
    private String longitude;

    @TableField("latitude")
    private String latitude;

    @TableField("camera_type")
    private Integer cameraType;

    @TableField("chan_num")
    private Integer chanNum;

    @TableField("cascade_code")
    private String cascadeCode;

    @TableField("capability")
    private String capability;

    @TableField("capability_set")
    private String capabilitySet;

    @TableField("channel_type")
    private String channelType;

    @TableField("decode_tag")
    private String decodeTag;

    @TableField("resource_type")
    private String resourceType;

    @TableField("create_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime createTime;

    @TableField("region_name")
    private String regionName;

    @TableField("region_path")
    private String regionPath;

    @TableField("update_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime updateTime;

    @TableField("external_code")
    private String externalCode;

    @TableField("trans_type")
    private Integer transType;

    @TableField("treaty_type")
    private String treatyType;

    @TableField("parent_resource_type")
    private String parentResourceType;

    @TableField("cascade_type")
    private Integer cascadeType;

    @TableField("device_class")
    private String deviceClass;

    @TableField("stream_type")
    private Integer streamType;

    @TableField("gb_external_index_code")
    private String gbExternalIndexCode;

    @TableField("region_path_name")
    private String regionPathName;

    @TableField("online_status")
    private Integer onlineStatus;

    @TableField("camera_relate_talk")
    private String cameraRelateTalk;
}
